package org.wlc.demov1;

/**
 * @author 王立朝
 * @date 2022/5/13
 * @description: 记录着类
 */
public class ConfigOriginator {
    private ConfigFile configFile;

    public ConfigFile getConfigFile() {
        return configFile;
    }

    public void setConfigFile(ConfigFile configFile) {
        this.configFile = configFile;
    }

    /**
     * 保存备忘录
     * @return
     */
    public ConfigMemento saveMemento(){
       return new ConfigMemento(configFile);
    }

    /**
     * 获取备忘录
     * @param configMemento
     */
    public void getMemento(ConfigMemento configMemento){
        this.configFile = configMemento.getConfigFile();
    }
}
